]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
extension-tool: Fix multi-monitor handling in example extension
authorFlorian Müllner <fmuellner@gnome.org>
Sat, 5 Jul 2014 09:20:01 +0000 (11:20 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Sat, 5 Jul 2014 09:22:46 +0000 (11:22 +0200)
src/gnome-shell-extension-tool.in

index 988271f6d163b4a3e4a5906dbf0974e494636f83..e00d5cd0b70e5f76f1c97ad5766606445affe0d9 100644 (file)
@@ -42,8 +42,8 @@ function _showHello() {
 
     let monitor = Main.layoutManager.primaryMonitor;
 
-    text.set_position(Math.floor(monitor.width / 2 - text.width / 2),
-                      Math.floor(monitor.height / 2 - text.height / 2));
+    text.set_position(monitor.x + Math.floor(monitor.width / 2 - text.width / 2),
+                      monitor.y + Math.floor(monitor.height / 2 - text.height / 2));
 
     Tweener.addTween(text,
                      { opacity: 0,